<layout name='layout/main' />
<script type="text/javascript">
$(function(){
	$("body").addClass("body-gray");
})  
</script>

<div class="tabMenu tab3"> <a href="<{:U('Order/index')}>" 
	<eq name="payStatus" value="">class="active"</eq>
	>全部</a> <a href="<{:U('Order/index',array('payStatus'=>'0'))}>" 
	<eq name="payStatus" value="0">class="active"</eq>
	>待付款</a> <a href="<{:U('Order/index',array('payStatus'=>'1'))}>" 
	<eq name="payStatus" value="1">class="active"</eq>
	>已付款</a>
</div>

<div class="orderList">
	<volist name="list" id="vo">
	<div class="am-panel am-panel-default">
		<div class="am-panel-hd">订单编号：<{$vo.order_no}><eq name="vo.payStatus" value="0"><font class="am-fr" color="red">未支付</font></eq></div>
		<div class="am-panel-bd">
			<volist name="vo.shop" id="f">
				<li class="orderInfo">
					<p class="pic"><a href="<{:U('Order/view',array('id'=>$vo['id']))}>"><img src="<{$f.picname}>"></a></p>
					<p class="info"><a href="<{:U('Order/view',array('id'=>$vo['id']))}>"><{$f.pname}></a><br/>
						单价：<{$f.price}><br/>
						数量：<{$f.number}>
						<eq name="vo.payStatus" value="1">
						<eq name="f.comment" value="0">
						<a href="<{:U('Order/comment',array('id'=>$f['id']))}>" class="am-btn am-btn-warning am-btn-xs am-fr">确认收货</a>
						</eq>
						</eq>
					</p>
				</li>
			</volist>
			<div class="order-money"> 总金额<font color="red"><{$vo.money}></font>元(含运费) </div>
		</div>
		<div class="am-panel-footer am-text-right">
			<eq name="vo.payStatus" value="0">
				<select class="repay" name="payType" id="payType<{$vo['order_no']}>">
					<option value="1" <eq name="vo.payType" value="1">selected</eq>>支付宝(手机版)</option>
					<option value="2" <eq name="vo.payType" value="2">selected</eq>>微信支付</option>
				</select>
				<button class="am-btn am-btn-danger am-btn-xs" onclick="payto('<{$vo['order_no']}>')">重新支付</button>

				<a href="<{:U('Order/cancel',array('id'=>$vo['id']))}>" class="am-btn am-btn-success am-btn-xs" onClick="if(!confirm('确定要取消吗？'))return false;">取消订单</a>
			<else/>
			<a href="<{:U('Order/cancel',array('id'=>$vo['id']))}>" class="am-btn am-btn-default am-btn-xs">删除订单</a>	
			</eq>		
		</div>
	</div>
	</volist>
</div>

<ul data-am-widget="pagination" class="am-pagination am-pagination-select">
	<{$page}>
</ul>
<script>
$(function(){
	$("#pageC").change(function(){
	  window.location.href=$(this).val();
	})
})  
function payto(order_no){
	location.href ="index.php?m=Store&a=repay&order_no="+order_no+"&payType="+$("#payType"+order_no).val();
}
</script>
<div class="footerBox"> <include file="Public:menu_member" /> </div>
